<?php
//base de datos, contasena, tal y como esta
$conn = oci_connect('antonhy', 'bahamuth', 'localhost/XE');
if (!$conn) {
    $e = oci_error();
    trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}

$estado=$_SESSION['estado2']=@$_REQUEST['cboestado']; 
$ciudad=$_SESSION['ciudad2']=@$_REQUEST['cbociudad'];
$colonia=$_SESSION['colonia2']=@$_REQUEST['cbocolo'];

//QUERY COMBO 1
$query=oci_parse($conn, "SELECT * FROM ESTADOS"); 
oci_execute($query);

	
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link rel="stylesheet" href="css/style.css">
  
  <title>INICIAR SESION</title>

<script type="text/javascript" language="javascript" src="js/ajax.js"></script>	
<script type="text/javascript" language="javascript" src="js/ajax.js"></script>	

<script type="text/javascript" language="javascript" src="js/ajax2.js"></script>	
<script type="text/javascript" language="javascript" src="js/ajax3.js"></script>	

<style>

/*modalmask*/

.modalmask {
	position: fixed;
	font-family: Arial, sans-serif;
	top: 0;
	right: 0;
	bottom: 0px;
	left: 0;
	background:#FF6600;
	background-repeat:no-repeat;
	background-size:1000%;	

	z-index: 99999;
	opacity:0;
	-webkit-transition: opacity 400ms ease-in;
	-moz-transition: opacity 400ms ease-in;
	transition: opacity 400ms ease-in;
	pointer-events: none;
}
.modalmask:target {
	opacity:1;
	pointer-events: auto;
}
.modalbox{
	width: 500px;
	position: relative;
	padding: 5px 20px 13px 20px;
	background: #FF6600;
	border-radius:3px;
	-webkit-transition: all 500ms ease-in;
	-moz-transition: all 500ms ease-in;
	transition: all 500ms ease-in;
	border:0.5px solid #FFF;
	box-shadow:0 0 20px rgba(0,0,0,0.4);
	
	
}

.movedown {
	margin: 0 auto;
}
.rotate {
	margin: 10% auto;
	-webkit-transform: scale(-5,-5); 
	transform: scale(-5,-5);
}
.resize {
	margin: 10% auto;
	width:0;
	height:0;

}
.modalmask:target .movedown{		
	margin:10% auto;
		width:400px;
	height:auto;

}
.modalmask:target .rotate{		
	transform: rotate(360deg) scale(1,1);
    -webkit-transform: rotate(360deg) scale(1,1);
	width:400px;
	height:auto;
	margin:50px auto;
}

.modalmask:target .resize{
	width:400px;
	height:auto;
	margin:50px auto;
}



.close {
	background: #606061;
	color: #FFFFFF;
	line-height: 25px;
	position: absolute;
	right: 1px;
	text-align: center;
	top: 1px;
	width: 24px;
	text-decoration: none;
	font-weight: bold;
	border-radius:3px;
	font-size:16px;
}

.close:hover { 
	background: #FAAC58; 
	color:#222;
}

.ul{
	width:500px;
	margin:20% auto;
	list-style:none;
	
}
.ul li{

	float:left;
	margin-right:35px;

}
.ul li a{
	font-family: Arial, sans-serif;
	font-size:16px;
	text-decoration:none;
	
	padding:20px;
	font-weight:bold;
	border-radius:3px;
	-webkit-transition: all 200ms ease-in;
	-moz-transition: all 200ms ease-in;
	transition: all 200ms ease-in;

}
.ul li a:hover{
	
	color:#222;

}

a{
	text-decoration:
	none;
	font-family: 'Black Ops One', cursive;
	font-size:14px;
	color:#FFF;



}
a:hover{
	color:#000;

}
.nsc{
	position:absolute;
	bottom:40%;
	right:0;
} 



p{
	color:#000;
    font-size:100%;
}
	
/*end modalmask*/
</style>
</head>

<body bgcolor="#FF4500">

   <?php
     if (isset($_GET['msg']) && $_GET['msg'] == 1) {
          echo '<p><strong>Your username and/or password could not be matched to a valid user account</strong></p>';
     }
     ?>
<img src='http://www.asmd.org/Content/images/login.png' style='height:100px;border-radius:40em;border:0.5px'/>

<form method="post" action="validar.php" id="login">

<table width="300" height="180" align="center" bgcolor="#FF6600" style="border: 0.5px hidden #FFF; align=center; box-shadow:0 0 20px rgba(0,0,0,0.4);">

<tr>

<td id="texto_preto_med"><h1 style="text-decoration:none;font-family: 'Black Ops One', cursive;font-size:14px;color:#FFF;">Usuario</h1></td>
<td><input name="user" maxlength="20" type="text"  style="width:85%;height:35px;padding:0.1em 10px;color:#6d6d6d;border-radius:1em;
text-align:center;" size="30" placeholder="Usuario:"/></td>
</tr>

<tr>

<td id="texto_preto_med"><h1 style="text-decoration:none;font-family:'Black Ops One','cursive';font-size:14px;color:#FFF;">Password:</h1></td>
    <td><input name="pass" maxlength="20" type="password" style="width:85%;
		height:35px;
		padding:0.1em 10px;
		color:#6d6d6d;
		border-radius:1em;
		text-align:center;" size="30" placeholder="Password:"/></td>
</tr>
 

<tr>

<td id="texto_preto_med"></td>
    <td><input name="nivel" maxlength="20" type="hidden" value="1" style="width:85%;
		height:35px;
		padding:0.1em 10px;
		color:#6d6d6d;
		border-radius:1em;
		text-align:center;" size="30"/></td>
</tr>
 

<tr>

<td id="texto_preto_med"></td>
    <td><input name="nivel" maxlength="20" type="hidden" value="1" style="width:85%;
		height:35px;
		padding:0.1em 10px;
		color:#6d6d6d;
		border-radius:1em;
		text-align:center;" size="30"/></td>
</tr>
<tr>
	<td colspan="2">
      
        <center><input value="INGRESAR" type="submit"   style="width:45%;
		height:35px;
		padding:0.1em 10px;
		color:#6d6d6d;
		border-radius:1em;
		text-align:center;float:right" size="30"/>



</center>
<a href="#modal6"><h1 style="width:10%; font-size:12px;" size="30"> REGISTRAR</a>          
      </td>
</tr>
<br />

</table>
</form>

<div id="modal6" class="modalmask">
		<div class="modalbox resize">
			<a href="#close" title="Close" class="close">X</a><h3><center>Registro de usuario.</center></h3><br />  <center>
<tr>
<td width="424" height="49"><center><h1 style="font-family:'Times New Roman', Times, serif; font-size:100%;">Usuario y Contraseña</h1></center>  </td>
</tr>
<?php
//base de datos, contasena, tal y como esta
$conn = oci_connect('antonhy', 'bahamuth', 'localhost/XE');
if (!$conn) {
    $e = oci_error();
    trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR);
}
?>



<script type="text/javascript">
function validacion(f)
{
	if(f.txtusuario.value == "")
	{
	alert("Inserte Usuario");
	f.txtusuario.focus();
	return true;
	}
if(f.txtpassword.value == "")
	{
	alert("Inserte apellido paterno");
	f.txtpassword.focus();
	return true;
	}
if(f.txtnombre.value == "")
	{
	alert("Inserte apellido materno");
	f.txtnombre.focus();
	return true;
	}
if(f.txtemail.value == "")
	{
	alert("Inserte ciudad");
	f.txtemail.focus();
	return true;
	}
if(f.txtdireccion.value == "")
	{
	alert("Inserte edad");
	f.txtdireccion.focus();
	return true;
	}
if(f.cboedad.value == "")
	{
	alert("Inserte direccion");
	f.cboedad.focus();
	return true;
	}
if(f.cboSexo.value == "")
	{
	alert("Inserte codigo postal");
	f.cboSexo.focus();
	return true;
	}
if(f.txtrfc.value == "")
	{
	alert("Inserte telefono");
	f.txtrfc.focus();
	return true;
	}
if(f.cbocivil.value == "")
	{
	alert("Inserte email");
	f.cbocivil.focus();
	return true;
	}

if(f.txtcuidad.value == "")
	{
	alert("Inserte email");
	f.txtcuidad.focus();
	return true;
	}
}
</script>
<form method="POST" name="form1" action="registro.php" onsubmit="return validacion(this)">
<!-- datos del formulario, capos de tu base de datos -->
Usuario: <input type="text" name="txtusuario" placeholder="Usuario:"/>
<br />Password: <input type="password" name="txtpassword" placeholder="Password:"/>
<br />Nombre: <input type="text" name="txtnombre" placeholder="Nombre:"/>
<br />Email: <input type="text" name="txtemail" placeholder="Email:"/>
<br />Direccion: <input type="text" name="txtdireccion" placeholder="Direccion:"/>
<br />Edad: <select type="text" name="cboedad"/>

<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
<option value="21">21</option>
<option value="22">22</option>
<option value="23">23</option>
<option value="24">24</option>
<option value="25">25</option>
<option value="26">26</option>
<option value="27">27</option>
<option value="28">28</option>
<option value="29">29</option>
<option value="30">30</option>
<option value="31">31</option>
<option value="32">32</option>
<option value="33">33</option>
<option value="34">34</option>
<option value="35">35</option>
<option value="36">36</option>
<option value="37">37</option>
<option value="38">39</option>
<option value="39">39</option>
<option value="40">40</option>
<option value="41">41</option>
<option value="42">42</option>

		</select>

<br />Sexo: <select name="cbosexo" />
<option value="Masculino">Masculino</option>
<option value="Femenino">Femenino</option>
		</select>

<br />RFC: <input type="text" name="txtrfc" placeholder="Rfc:"/>
<br />Estado civil: <select name="cbocivil" />
<option value="Soltero">Soltero</option>
<option value="Casado">Casado</option>
</select>
<br />ESTADOS:<select name="cboestado" id="cboestado" onchange="from(document.form1.cboestado.value,'midiv','ciudad2.php')">

<option  value="">SELECCIONA....</option>

<?php while($row=oci_fetch_array($query))
{


?>
<option  value="<?php echo  $row['IDESTADO']?>"> <?php echo htmlentities($row['ESTADO']);?></option>

<?php 
}
 ?>
</select>


<div id="midiv">
			
		</div>
	

<div id="midiv2">
			
		</div>


<br /><input type="submit" value="Guardar" name="btnGuardar" />
</form>


</div>
</div>



</body>
</html>
